Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force unzip without prompt in sonar scanner installation when files already exist #163

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

blgnksy
Copy link
Contributor

@blgnksy blgnksy commented Dec 11, 2024

Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes. If you would like to see a new feature, please create a new thread in the forum "Suggest new features".

With that in mind, if you would like to submit a code contribution, make sure that you adhere to the following guidelines and all tests are passing:

  • Please explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make
  • Make sure any code you changed is covered by tests
  • If there is a JIRA ticket available, please make your commits and pull request start with the ticket ID (SONAR-XXXX)

We will try to give you feedback on your contribution as quickly as possible.

Thank You!
The SonarSource Team

This PR aims to fix the issue of failing installation for sonar scanner.

Workflow file:

 - name: SonarQube Scan
        continue-on-error: false
        uses: sonarsource/sonarqube-scan-action@master
        with:
          projectBaseDir: api
          args: >
            ...
        env:
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

Error log for action:

Run sonarsource/sonarqube-scan-action@master
Run ${GITHUB_ACTION_PATH}/sanity-checks.sh
Run actions/[email protected]
Cache not found for input keys: sonar-scanner-cli-6.2.1.4610-Linux-X64
Run ${GITHUB_ACTION_PATH}/install-sonar-scanner-cli.sh
+ mkdir -p /home/xxxx/actions-runner/_work/_temp/sonarscanner
+ cd /home/xxx/actions-runner/_work/_temp/sonarscanner
+ SCANNER_FILE_NAME=sonar-scanner-cli-6.2.1.4610-linux-x64.zip
+ SCANNER_URI=https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-linux-x64.zip
+ command -v wget
+ wget --no-verbose --user-agent=sonarqube-scan-action https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-linux-x64.zip
2024-12-11 17:16:42 URL:https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.1.4610-linux-x64.zip [57996219/57996219] -> "sonar-scanner-cli-6.2.1.4610-linux-x64.zip.6" [1]
+ unzip -q sonar-scanner-cli-6.2.1.4610-linux-x64.zip
replace sonar-scanner-6.2.1.4610-linux-x64/jre/conf/sound.properties? [y]es, [n]o, [A]ll, [N]one, [r]ename:  NULL
(EOF or read error, treating as "[N]one" ...)
Error: Process completed with exit code 1.

@blgnksy blgnksy changed the title Update install-sonar-scanner-cli.sh Fix sonar scanner installation failure Dec 11, 2024
@antonioaversa antonioaversa self-requested a review December 11, 2024 17:34
@antonioaversa antonioaversa changed the title Fix sonar scanner installation failure Force unzip without prompt in sonar scanner installation when files already exist Dec 11, 2024
Copy link
Contributor

@antonioaversa antonioaversa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you for this contribution @blgnksy.

We will merge the PR close to the release of the upcoming v4.2.0, which should happen in the next days.

@antonioaversa antonioaversa marked this pull request as draft December 11, 2024 18:22
@antonioaversa antonioaversa marked this pull request as ready for review December 16, 2024 09:33
@antonioaversa antonioaversa force-pushed the fix/failing/installation branch from c7e81a4 to ff6bdb6 Compare December 16, 2024 09:37
@antonioaversa antonioaversa merged commit ea0362b into SonarSource:master Dec 16, 2024
51 checks passed
@blgnksy blgnksy deleted the fix/failing/installation branch December 16, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants